package router

import (
	"gateway/handler/api"
	"github.com/gin-gonic/gin"
)

// OperationLog 操作日志路由
func OperationLog(v1 *gin.RouterGroup) {
	operationLog := v1.Group("/operation-log")
	{
		operationLog.GET("/user", api.GetLogsByUser)           // 根据用户ID获取操作日志
		operationLog.GET("/module", api.GetLogsByModule)       // 根据模块获取操作日志
		operationLog.GET("/resource", api.GetLogsByResource)   // 根据资源获取操作日志
		operationLog.POST("/condition", api.GetLogsByCondition) // 根据条件获取操作日志
		operationLog.GET("/statistics", api.GetLogStatistics)  // 获取日志统计信息
		operationLog.POST("/delete-old", api.DeleteOldLogs)    // 删除旧日志
	}
}

